#udev-modal.modal.fade(tabindex='-1', role='dialog')
  .modal-dialog(role='document')
    .modal-content
      .modal-header
        button.close(type='button', data-dismiss='modal', aria-label='Close')
          span(aria-hidden='true') ×
        h4.modal-title Warning!
      .modal-body
        p
          | The installer needs to have the appropriate udev rules set to be able to communicate with devices over adb or fastboot. Click the button below to have the installer set up the rules automatically. You will be prompted to authorize this with your admin password.
          br
          | Alternatively, you can choose to do this #[a(onclick="shell.openExternal('https://docs.ubports.com/en/latest/userguide/install.html#missing-udev-rules')") manually] through the command-line.
      .modal-footer
        button.btn.btn-default(type='button', data-dismiss='modal') Dismiss
        button.btn.btn-default(type='button', data-dismiss='modal', onclick="localStorage.setItem('neverAskForUdevRules', 'true');") Don't ask me again
        button.btn.btn-primary(type='button', data-dismiss='modal', onclick="localStorage.setItem('neverAskForUdevRules', 'true'); ipcRenderer.send('udev');") Set up rules automatically.
  script.
    if (process.platform === "linux" && !process.env.SNAP && !localStorage.getItem('neverAskForUdevRules')) {
      setTimeout(() => modals.show('udev'), 1000);
    }